package com.wxx.s;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	public static void main(String[] args) {
		/*
		 * //1. 创建helloWorld对象 HelloWorld hl = new HelloWorld(); //2.
		 * 创建helloWorld对象 hl.setName("Spring");
		 */

		// 1. 创建springIOC容器
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
		// 2. 创建helloWorld对象
		HelloWorld hl = (HelloWorld) ctx.getBean("helloWorld");
		// 3. 创建helloWorld对象
		hl.Hello();
	}

}
